﻿'Nombre:                         Principal
'Descripcion:                    Ventana principal
'Dependencias:                 
'Fecha de creación:              20090418
'Autor:                          VMORALES
'Fecha de modifcación:         
'Responsable:                  
'Num. de modifcación:            0

Option Explicit On
Option Strict On

#Region "Imports"

Imports System.Windows.Forms
Imports Electrocucaracha.AdminPersonal.GUI.Movimiento
Imports Electrocucaracha.AdminPersonal.DAO

Imports System.Windows.Data

#End Region


''' <summary>
'''Ventana principal
''' </summary>
Partial Public Class Principal

#Region "Constantes"

#End Region

#Region "Miembros"

#End Region

#Region "Propiedades"

#End Region

#Region "Contructores"

#End Region

#Region "Funciones"

#End Region

    Private Sub mnuSalir_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuSalir.Click
        Me.Close()
    End Sub

    Private Sub Principal_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
        Dim respuesta As DialogResult = MessageBox.Show("¿Desea salir de la aplicación?", "Confirmacion", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)
        If respuesta = Forms.DialogResult.No Then
            e.Cancel = True
        Else
            My.Application.Shutdown()
        End If
    End Sub

    Private Sub mnuCargarMovimientos_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuImportar.Click
        Dim wcm As ImportarArchivoVentana = New ImportarArchivoVentana()

        wcm.ShowDialog()
    End Sub

    Private Sub mnuBancos_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuBancos.Click
        Dim w As Banco.AdministracionVentana = Banco.AdministracionVentana.Instancia

        With w
            .Show()
            .Focus()
        End With
    End Sub

    Private Sub mnuCategorias_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuCategorias.Click
        Dim w As Categoria.AdministracionVentana = Categoria.AdministracionVentana.Instancia
        With w
            .Show()
            .Focus()
        End With
    End Sub

    Private Sub mnuCuentas_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuCuentas.Click
        Dim w As Cuenta.AdministracionVentana = Cuenta.AdministracionVentana.Instancia
        With w
            .Show()
            .Focus()
        End With
    End Sub

    Private Sub mnuTitulares_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuTitulares.Click
        Dim w As Titular.AdministracionVentana = Titular.AdministracionVentana.Instancia
        With w
            .Show()
            .Focus()
        End With
    End Sub

    Private Sub mnuAcercaDe_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles mnuAcercaDe.Click
        Dim w As AcercaDeVentana = New AcercaDeVentana()
        With w
            .Show()
        End With
    End Sub
End Class